From: Georges Basile Stavracas Neto Date: Mon, 10 Feb 2020 18:15:16 +0000 (-0300) Subject: authPrompt: Remove colons from questions X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~777^2^2~68 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=66835c6e15b40ac8a0175c250e4ead0a24a12b2e;p=gnome-shell.git authPrompt: Remove colons from questions Unfortunately, the question that is displayed comes directly from PAM. It usually is just "Password:", which comes from pam-unix, but other questions can be set, usually with the colons, since they are crafted with a CLI workflow in mind. Manually drop the colons from questions asked by PAM. This is also done by the PolKit agent, which shows how the stack is fragile, but it's what we have for now. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/922 --- diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 974f51778..13c7025c3 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -209,7 +209,8 @@ var AuthPrompt = GObject.registerClass({ } this._updateEntry(secret); - this.setQuestion(question); + // HACK: the question comes directly from PAM + this.setQuestion(question.replace(/: *$/, '…').trim()); this.updateSensitivity(true); this.emit('prompted');